import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/ruoyi.js";

// 查询环境配置
export function getConfigList() {
    return request({
        url: '/encryption/envConfig/getConfigList',
        method: 'get'
    })
}

export function getAllConfigList() {
    return request({
        url: '/encryption/envConfig/getAllConfigList',
        method: 'get'
    })
}

export function getConfig(query) {
    return request({
        url: '/encryption/envConfig/' + parseStrEmpty(query),
        method: 'get'
    })
}

// 新增环境配置
export function addEnvConfig(data) {
    return request({
        url: '/encryption/envConfig/addEnvConfig',
        method: 'post',
        data: data
    })
}

// 修改环境配置
export function updateEnvConfig(data) {
    return request({
        url: '/encryption/envConfig/updateEnvConfig',
        method: 'post',
        data: data
    })
}

// 删除环境配置
export function delEnvConfig(id) {
    return request({
        url: '/encryption/envConfig/' + id,
        method: 'delete'
    })
}
